/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.iti.jets.gpts.bean;

import com.iti.jets.gpts.pojo.Feedback;
import com.iti.jets.gpts.service.UserFeedbackService;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.model.ListDataModel;

/**
 *
 * @author khalifaabdelaziz
 */
@ManagedBean
@ViewScoped
public class UserFeedBackBean {
    private UserFeedbackService feedbackService;
    private ListDataModel<Feedback> feedbacks ;
    /**
     * Creates a new instance of UserCommentBean
     */
    public UserFeedBackBean() {
        feedbackService= new UserFeedbackService();
        List feedbackUser = feedbackService.getFeedbackUser(UsersBean.selectedID);
        feedbacks= new ListDataModel<Feedback>(feedbackUser);   
    }

    public ListDataModel<Feedback> getFeedbacks() {
        return feedbacks;
    }

    public void setFeedbacks(ListDataModel<Feedback> feedbacks) {
        this.feedbacks = feedbacks;
    }
    
    
}
